package com.atguigu.lease.common.context;

public class UserUtil {

    private static ThreadLocal<LoginUser> tl = new ThreadLocal<>();

    public static LoginUser getUser(){
        return tl.get();
    }

    public static void setUser(LoginUser loginUser){
        tl.set(loginUser);
    }

    public static void clear(){
        tl.remove();
    }

}
